home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 24
/
Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso
/
Aminet
/
dev
/
mui
/
mui38dev_bb2.lha
/
EFMUILib
/
Examples
/
EFEnvBrowser.asc
< prev
next >
Wrap
Text File
|
1998-02-03
|
3KB
|
123 lines
;(EF) EnvBrowser
;(c)1992-1997 by Stefan Stuntz
;(c)1997/98 by Vivid Imagination
WBStartup
#GVF_GLOBAL_ONLY=$100
#GVF_BINARY_VAR=$400
#ID_DISPLAY=1
#ID_EDIT=2
#ID_DELETE=3
#ID_SAVE=4
MUIApplicationTitle "EnvBrowser"
MUIApplicationVersion "$VER: EnvBrowser 19.5 (12.02.97)"
MUIApplicationCopyright "(c)1992/93, Stefan Stuntz"
MUIApplicationAuthor "Stefan Stuntz"
MUIApplicationDescription "View environment variables."
MUIApplicationBase "ENVBROWSER"
MUIAddTags 1,#MUIA_Frame,#MUIV_Frame_InputList
MUIAddTags 1,#MUIA_Dirlist_Directory,Null("env:")
MUIAddTags 1,#MUIA_Dirlist_FilterDrawers,1
MUIAddTags 1,#MUIA_List_Format,Null("COL=0")
MUINewObject 1,"Dirlist.mui",0
MUIListView 2,1
MUIAddObjHGroup 5,2
MUIAddTags 3,#MUIA_Frame,#MUIV_Frame_ReadList
MUIAddTags 3,#MUIA_Font,#MUIV_Font_Fixed
MUINewObject 3,"Floattext.mui",0
MUIListView 4,3
MUIAddObjHGroup 5,4
MUICreateHGroup 5
MUIAddObjVGroup 0,5
MUISimpleButton 6,"_Edit"
MUISimpleButton 7,"_Delete"
MUISimpleButton 8,"_Save"
MUIAddObjsHGroup 9,6,7,8
MUIAddTags 9,#MUIA_Group_SameSize,1
MUICreateHGroup 9
MUIAddObjVGroup 0,9
MUICreateVGroup 0
MUICreateWindow 10,"Environment Browser","MAIN",0
MUIAddSubWindow 10
If MUICreateApplication<>True Then End
MUIApplicationObj 11
MUINotifyApp 10,#MUIA_Window_CloseRequest,1,-1
MUINotifyApp 2,#MUIA_List_Active,#MUIV_EveryTime,#ID_DISPLAY
MUINotifyApp 2,#MUIA_Listview_DoubleClick,1,#ID_EDIT
MUINotifyApp 7,#MUIA_Pressed,0,#ID_DELETE
MUINotifyApp 8,#MUIA_Pressed,0,#ID_SAVE
MUINotifyApp 6,#MUIA_Pressed,0,#ID_EDIT
MUIDoMethod 10,#MUIM_Window_SetCycleChain,MUIObjLoc(2),MUIObjLoc(4),MUIObjLoc(6),MUIObjLoc(7),MUIObjLoc(8),0
MUIOpenWindow 10
running=1
MaxLen buf$=2048
Repeat
ev.l=MUIWaitEvent
Select ev
Case -1
running=0
Case #ID_DISPLAY
*var.b=MUIGet(2,#MUIA_Dirlist_Path)
If (*var<>0 AND GetVar_(*var,&buf$,2048,#GVF_GLOBAL_ONLY|#GVF_BINARY_VAR)<>-1)
MUISet 4,#MUIA_Floattext_Text,Null(Peek$(&buf$))
Else
DisplayBeep_ 0
EndIf
Case #ID_DELETE
*var.b=MUIGet(2,#MUIA_Dirlist_Path)
If *var<>0
MUISet 4,#MUIA_Floattext_Text,0
DeleteFile_ *var
MUIDoMethod 2,#MUIM_List_Remove,#MUIV_List_Remove_Active
Else
DisplayBeep_ 0
EndIf
Case #ID_SAVE
*var.b=MUIGet(2,#MUIA_Dirlist_Path)
If *var<>0
MUISet 11,#MUIA_Application_Sleep,1
buf$="copy env:"+Peek$(FilePart_(*var))+" envarc:"+Peek$(FilePart_(*var))+Chr$(0)
Execute_ &buf$,0,0
MUISet 11,#MUIA_Application_Sleep,0
Else
DisplayBeep_ 0
EndIf
Case #ID_EDIT
*var.b=MUIGet(2,#MUIA_Dirlist_Path)
If *var<>0
MUISet 11,#MUIA_Application_Sleep,1
buf$="ed "+Chr$(34)+Peek$(*var)+Chr$(34)+Chr$(0)
Execute_ &buf$,0,0
MUISet 11,#MUIA_Application_Sleep,0
MUIDoMethod 10,#MUIM_Window_ScreenToFront,0
Else
DisplayBeep_ 0
EndIf
End Select
Until running=0
MUICloseWindow 10
End